package org.example.exampreparationtreasure.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.exampreparationtreasure.model.entity.ExamPaper;

import java.util.List;
@Mapper
public interface ExamPaperMapper extends BaseMapper<ExamPaper> {
    @Select("SELECT * FROM exam_paper WHERE category_id = #{categoryId}")
    List<ExamPaper> selectByCategoryId(Long categoryId);


    // 使用XML配置的复杂查询
    List<ExamPaper> selectWithDetail(Long paperId);
}
